package com.nut.spp.api.sys;

import com.nut.spp.common.Result;
import com.nut.spp.jbb.JbbService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/sms")
public class SmsController {

    @Autowired
    private JbbService jbbService;

    @GetMapping("/test")
    public Result test() {
        return Result.ok();
    }

    @GetMapping(value = "/sendSms/{mobile}")
    public Result sendSms(@PathVariable String mobile) {
        jbbService.sendSms(mobile);
        return Result.ok();
    }

}
